local timebomb = Instance.new("Tool") timebomb.Name = "Timebomb" timebomb.Grip = CFrame.new(0, 0, 0, 1, 0, 0, 0, 0, -1, -0, 1, 0) timebomb.TextureId = "rbxasset://Textures/Bomb.png" local handle = Instance.new("Part") handle.Name = "Handle" handle.Shape = Enum.PartType.Ball handle.BottomSurface = Enum.SurfaceType.Smooth handle.CFrame = CFrame.new(-7.04361916, 1, 71.7818909, -1, 0, 0, -0, 0, 1, -0, 1, 0) handle.Rotation = Vector3.new(-90, 0, -180) handle.Size = Vector3.new(2, 2, 2) handle.TopSurface = Enum.SurfaceType.Smooth local mesh = Instance.new("SpecialMesh") mesh.Name = "Mesh" mesh.MeshType = Enum.MeshType.FileMesh mesh.MeshId = "rbxasset://fonts/timebomb.mesh" mesh.TextureId = "rbxasset://textures/bombtex.png" mesh.Parent = handle handle.Parent = timebomb timebomb.Parent = owner.Backpack do local script = Instance.new("Folder", timebomb) local Tool = script.Parent local Bomb = Tool.Handle function plant() local bomb2 = Instance.new("Part") local vCharacter = Tool.Parent local vPlayer = game.Players:playerFromCharacter(vCharacter) local spawnPos = Bomb.Position bomb2.Position = Vector3.new(spawnPos.x, spawnPos.y+3, spawnPos.z) bomb2.Size = Vector3.new(2,2,2) bomb2.BrickColor = BrickColor.new(21) bomb2.Shape = 0 bomb2.BottomSurface = 0 bomb2.TopSurface = 0 bomb2.Reflectance = 1 bomb2.Name = "TimeBomb" bomb2.Locked = true local creator_tag = Instance.new("ObjectValue") creator_tag.Value = vPlayer creator_tag.Name = "creator" creator_tag.Parent = bomb2 bomb2.Parent = game.Workspace do local script = Instance.new("Folder", bomb2) local updateInterval = .4 local currentColor = 1 local colors = {26, 21} local ticksound = Instance.new("Sound") ticksound.SoundId = "rbxasset://sounds\\clickfast.wav" ticksound.Parent = script.Parent function update() updateInterval = updateInterval * .9 script.Parent.BrickColor = BrickColor.new(colors[currentColor]) currentColor = currentColor + 1 if (currentColor > 2) then currentColor = 1 end end function blowUp() local sound = Instance.new("Sound") sound.SoundId = "rbxasset://sounds\\Rocket shot.wav" sound.Parent = script.Parent sound.Volume = 1 sound:play() explosion = Instance.new("Explosion") explosion.BlastRadius = 12 explosion.BlastPressure = 1000000 -- these are really wussy units -- find instigator tag local creator = script.Parent:findFirstChild("creator") if creator ~= nil then explosion.Hit:connect(function(part, distance) onPlayerBlownUp(part, distance, creator) end) end explosion.Position = script.Parent.Position explosion.Parent = game.Workspace script.Parent.Transparency = 1 end function onPlayerBlownUp(part, distance, creator) if part.Name == "Head" then local humanoid = part.Parent.Humanoid tagHumanoid(humanoid, creator) end end function tagHumanoid(humanoid, creator) -- tag does not need to expire iff all explosions lethal if creator ~= nil then local new_tag = creator:clone() new_tag.Parent = humanoid end end function untagHumanoid(humanoid) if humanoid ~= nil then local tag = humanoid:findFirstChild("creator") if tag ~= nil then tag.Parent = nil end end end while updateInterval > .1 do task.wait(updateInterval) update() ticksound:play() end blowUp() task.wait(2) script.Parent:remove() end end Tool.Enabled = true function onActivated() if not Tool.Enabled then return end --Tool.Enabled = false local character = Tool.Parent; local humanoid = character.Humanoid if humanoid == nil then print("Humanoid not found") return end local targetPos = humanoid.TargetPoint --Bomb.Transparency = 1.0 plant() --wait(6) --Bomb.Transparency = 0.0 --Tool.Enabled = true end function onUnequipped() end Tool.Activated:connect(onActivated) Tool.Unequipped:connect(onUnequipped) end